<template>
  <div >
    <!-- 头部标题栏 -->
    <content-header
      :title="artical.vTitle"
    ></content-header>
    <share class="xui-margin-top-sm" :title="artical.vTitle"></share>
    <div class="content-wrap" v-html="artical.vContent" v-loading="loading">
    </div>
  </div>
</template>

<script>
import { getlearningDetail } from "@/api/learning-guide";
import contentHeader from "@/components/widge/content-header.vue";
import detailInfo from "@/components/widge/detail-info";
import share from "@/components/widge/share";

export default {
  components: {
    detailInfo,
    contentHeader,
    share
  },
  data() {
    return {
      artical: {
        vTitle: "",
        content: ""
      },
      loading: true
    };
  },
  computed: {
    id() {
      return this.$route.params.id;
    }
  },
  methods: {
    getDetail() {
      getlearningDetail(this.id).then(res => {
        this.artical = res.data;
        this.loading = false;
      });
    }
  },
  mounted() {
    this.getDetail();
  }
};
</script>
